package adv4;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;

/**
 * @author oldliu
 * @since 1.0
 */
public class FileTest4 {
    public static void main(String[] args) {
        //有隐患
        try {
            //FileOutputStream fout=new FileOutputStream("d:/tmp/java86/花名册.txt");
            FileOutputStream fout=new FileOutputStream("d:/tmp/java86/花名册.txt",true);
            fout.write('\r');
            fout.write('\n');
            fout.write(97);
            fout.write(66);
            fout.write(67);
            fout.write('f');
            fout.write(21016);//=>byte
            String str="范德是是个big帅哥";
            fout.write(str.getBytes());
            fout.write("徐恩的是个小帅哥".getBytes());
            fout.flush();
            fout.close();
        } catch (Exception e) {
             e.printStackTrace();
        }
    }
}
